#include "taskthumbnailrequest.h"

namespace Wishmaster {

TaskThumbnailRequest::TaskThumbnailRequest(const PostId& postId, int attachmentIndex, const QUrl& link, const QString& msg, Connector* connector)
	: TaskRequest(rtPost, link, msg, connector),
	m_postid(postId),
	m_attachmentIndex(attachmentIndex)
{
}

PostId TaskThumbnailRequest::postId() const
{
	return m_postid;
}

int TaskThumbnailRequest::attachmentIndex() const
{
	return m_attachmentIndex;
}

void TaskThumbnailRequest::slot_result(const RequestPtr& rq, const QByteArray& arr)
{
	if(rq)
		emit result(this, arr, rq->contentType());
	TaskRequest::slot_result(rq, arr);
}

} // namespace Wishmaster
